package com.icavy.yousha.dao;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.icavy.yousha.entity.User;

@Repository("userDAO")
public class UserDAO {

    private static Map<String, String> userMap = new HashMap<String, String>();

    static {
        userMap.put("admin@icavy.com", "123456");
    }

    public boolean check(String email, String password) {
        return userMap.get(email) != null;
    }

    public void save(User user) {
        userMap.put(user.getEmail(), user.getPassword());
    }

}
